home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / EXEC.SWG / 0006_EXEC DOS in a Window.pas < prev    next >
Pascal/Delphi Source File  |  1993-10-28  |  1KB  |  53 lines

  1. {===================================================================
  2. Date: 10-19-93 (19:37)
  3. From: MAYNARD PHILBROOK
  4. Subj: Re: Execwindow graphics
  5. ----------------------------------------------------------------------}
  6. {$F+,I-,S-,D-}
  7. {$m 1024, 0, 3000}
  8.  
  9. Uses Crt, Dos;
  10. Var
  11. OLD_29H :Pointer;
  12. C   :Char;         { Holds Charactor to Write }
  13. {$F+}
  14.  
  15. Procedure Patch1;
  16. Interrupt;
  17. Begin
  18.     Write(C);
  19. End;
  20.  
  21. Procedure Patch; Assembler;
  22.   Asm
  23.     Push DS
  24.     Push Ax
  25.         Mov   AX, Seg C;
  26.         Mov   DS, AX;
  27.         Pop   AX;
  28.         Mov   C, Al;
  29.         Pop   DS
  30.         Jmp   Patch1;
  31.   End;
  32. Begin
  33.  Clrscr;
  34.  GetINtVec($29, OLD_29H);
  35.  SetIntVec($29, @Patch);
  36.  Window(14, 10, 40, 22);
  37.  ClrScr;
  38.  Exec('C:\Command.com',' /c dir');
  39.  Readkey;
  40.  SetIntVec($29, OLD_29h);
  41. End.
  42.  
  43. The Command.com is just an example..
  44. Note:
  45. If your using ANSI.SYS in Dos, this will not use Anis..
  46. TP uses its own screen writes, but this code directs all Dos Char Output
  47. to the TP window.
  48. To Stop echo of Dos functions or what ever, use the
  49. > NULL at the end of the parms when executing..
  50.  
  51. --- MsgToss 2.0b
  52.  * Origin: Sherwood Forest RBBS 203-455-0646 (1:327/453)
  53.